import request from '@/utils/request'

// 查询历史订单列表
export function listHistoryOrders(query) {
  return request({
    url: '/historyOrders/list',
    method: 'get',
    params: query
  })
}

// 查询历史订单详细
export function getHistoryOrders(id) {
  return request({
    url: '/historyOrders/orderById/' + id,
    method: 'get'
  })
}

// 新增历史订单
export function addHistoryOrders(data) {
  return request({
    url: '/historyOrders/historyOrders',
    method: 'post',
    data: data
  })
}

// 修改历史订单
export function updateHistoryOrders(data) {
  return request({
    url: '/historyOrders/historyOrders',
    method: 'put',
    data: data
  })
}

// 删除历史订单
export function delHistoryOrders(id) {
  return request({
    url: '/historyOrders/historyOrders/' + id,
    method: 'delete'
  })
}

// 查询订单列表列表
export function queryOrderByID(id) {
  return request({
    url: '/historyOrders/orderById/'+id,
    method: 'get',
    params: id
  })
}